# @Time : 2024/7/19 16:20
# @Author : Adam
# @Version : v1.0
# @IDE : PyCharm
# @Project : tracer

from django.urls import path
from web.views import account, home, project, statistics, wiki, file, issues, setting,dashboard

# app_name = 'web'

urlpatterns = [
    path('register/', account.register, name='register'),
    path('login/email/', account.login_email, name='login_email'),
    path('login/', account.login, name='login'),
    path('logout/', account.logout, name='logout'),
    path('image/code/', account.image_code, name='image_code'),
    path('send/email/', account.send_email, name='send_email'),
    path('index/', home.index, name='index'),

    # 项目列表
    path('project/list/', project.project_list, name='project_list'),
    # project/star/my/1
    # project/star/join/1
    path('project/star/<str:project_type>/<int:project_id>', project.project_star, name='project_star'),
    path('project/unstar/<str:project_type>/<int:project_id>', project.project_unstar, name='project_unstar'),

    #dashboard
    path('manage/<int:project_id>/dashboard', dashboard.dashboard, name='dashboard'),
    path('manage/<int:project_id>/dashboard/issues/chart', dashboard.issues_chart, name='issues_chart'),
    # 项目管理
    path('manage/<int:project_id>/statistics', statistics.statistics, name='statistics'),

    # wiki
    path('manage/<int:project_id>/wiki', wiki.wiki, name='wiki'),
    path('manage/<int:project_id>/wiki/add', wiki.wiki_add, name='wiki_add'),
    path('manage/<int:project_id>/wiki/catalog', wiki.wiki_catalog, name='wiki_catalog'),
    path('manage/<int:project_id>/wiki/delete/<int:wiki_id>', wiki.wiki_delete, name='wiki_delete'),
    path('manage/<int:project_id>/wiki/edit/<int:wiki_id>', wiki.wiki_edit, name='wiki_edit'),
    path('manage/<int:project_id>/wiki/upload', wiki.wiki_upload, name='wiki_upload'),
    # path('manage/<int:project_id>/wiki/detail', wiki.wiki_detail, name='wiki_detail'),
    path('manage/<int:project_id>/setting', setting.setting, name='setting'),

    # file
    path('manage/<int:project_id>/file/', file.file, name='file'),
    path('manage/<int:project_id>/file/delete/', file.file_delete, name='file_delete'),
    path('manage/<int:project_id>/file/upload/', file.file_upload, name='file_upload'),

    # issues
    path('manage/<int:project_id>/issues/', issues.issues, name='issues'),
    path('manage/<int:project_id>/issues/detail/<int:issues_id>', issues.issues_detail, name='issues_detail'),
    path('manage/<int:project_id>/issues/record/<int:issues_id>', issues.issues_record, name='issues_record'),
    path('manage/<int:project_id>/issues/change/<int:issues_id>', issues.issues_change, name='issues_change'),
    path('manage/<int:project_id>/issues/invite/url', issues.invite_url, name='invite_url'),

    path('invite/join/<str:code>', issues.invite_join, name='invite_join'),

    # setting
    path('manage/<int:project_id>/setting', setting.setting, name='setting'),
    path('manage/<int:project_id>/setting/delete', setting.setting_delete, name='setting_delete'),



]
